package com.regedit.aplicacion.utils;

import android.content.Context;
import android.content.SharedPreferences;

public class AppPrefences {

	private static final String PREF_FILE = "seguriapp";
	private static final String USER_NAME = "username";
	

	private transient final SharedPreferences settings;
	public transient Context mContext;

	public AppPrefences(final Context context) {
		mContext = context;
		settings = context
				.getSharedPreferences(PREF_FILE, Context.MODE_PRIVATE);
	}

	public String getUserName() {
		return settings.getString(USER_NAME, null);
	}

	public void setUserName(final String name) {
		final SharedPreferences.Editor editor = settings.edit();
		editor.putString(USER_NAME, name);
		editor.commit();
	}

	

}
